import rxAjax from '@/assets/js/ajax.js';

//规则引擎定义 api接口
export const FormLiteFlowApi = {};

FormLiteFlowApi.baseUrl= '/api-form/form/core/formLiteFlow';

/**
* 获取单记录
* @param pkId
* @returns {*}
*/
FormLiteFlowApi.get =function(pkId) {
  var url= FormLiteFlowApi.baseUrl + '/get?pkId=' + pkId;
  return rxAjax.get(url);
}

/**
 * 执行规则引擎
 * @param pkId
 * @returns {*}
 */
FormLiteFlowApi.executeLiteFlow =function(liteFlowId, params) {
    var url= FormLiteFlowApi.baseUrl + '/executeLiteFlow?liteFlowId=' + liteFlowId;
    return rxAjax.postJson(url,params);
}

export  default FormLiteFlowApi;

